#include<bits/stdc++.h>
using namespace std;
int ans,n;
const int N=1e5+5;
int a[N],b[N];
int ans1,ans2;
int main(){
    freopen("duel.in","w",stdin);
    freopen("duel.out","r",stdout);
    cin>>n;
    ans=n;
    for(int i=1;i<=n;i++){
        cin>>a[i];
    }
    sort(a+1,a+n+1);
    for(int i=1;i<=n;i++){
        b[a[i]]+=1;
    }
    ans1=b[a[1]];
    for(int i=a[1]+1;i<=a[n];i++){
        if(b[i]!=0){
           ans2=b[i];
           int t=min(ans1,ans2);
           ans1=ans1-t+ans2;
           ans-=t;
        }
    }
    cout<<ans<<endl;
    return 0;
}
